class DataUtils::Geo::SearchResult
	@@confidence = {}
		
    attr_reader :city, :region, :country, :confidence
    def initialize(params)
        @city = params[:city]
        @region = params[:region]
        @country = params[:country]
        @confidence = params[:confidence]
    end
    
    def to_s()
        return "#{@city}, #{@region}, #{@country} [#{@confidence}]"
    end
    def to_hash()
    	return {:city => @city, :region => @region, :country => @country, :confidence => @confidence}
    end
    
    def confidence_val()
    	return @@confidence[@confidence]
    end
    private
    def self.init()
    	@@confidence[:zero] = 0
		@@confidence[:country] = 1
		@@confidence[:region] = 2
		@@confidence[:city] = 3
    end
    
    init()
end
